package com.hzw.code.extend

import android.app.Activity
import android.content.Context
import com.hzw.code.utils.newIntentWithArg

/**
 *
 * @Author:         HuaZhongWei
 * @CreateDate:     2020/4/15 10:46
 *
 * @Description:    Activity的扩展功能
 *
 */


inline fun <reified T: Activity> Context.startActivity(vararg params: Pair<String, Any?>) {
    val intent = newIntentWithArg(params)
    intent.setClass(this, T::class.java)
    startActivity(intent)
}